#include <stdio.h>
#include <unistd.h>

int main(){
    printf("*****exec start*****\n");
    //execl("/usr/bin/ls", "ls", "-a", "-l", NULL);
    //execl("/usr/bin/pwd", "pwd", NULL);

    //execlp("ls", "ls", "-a", "-l", NULL);

    extern char** environ; 
    //execle("/usr/bin/ls", "ls", "-a", "-l", NULL, environ);

    char* argv[10];
    argv[0] = "ls";
    argv[1] = "-a";
    argv[2] = "-l";
    argv[3] = NULL;
    //execv("/usr/bin/ls", argv);

    //execvp("ls", argv);
    execve("/usr/bin/ls", argv, environ);
    printf("*****exec end*****\n");
    return 0;
}
